{% extends "base.html" %}

{% block header %}
    <h1>{% block title %}分类{% endblock %}</h1>
{% endblock %}

{% block user %}
    {% block username %}
        {{ username }}
    {% endblock %}
{% endblock %}

{% block content %}
    <div style="padding-top: 20px">
        <h3 class="text-center">选择基准测试</h3>
    </div>
    <div style="display: table-cell; vertical-align: middle; text-align: center; padding-top:20px; padding-left: 10%">
        <div class="container-fluid" style="height: 40vh;">
            {% for table_name in tables['name'] %}
                {% if database_info.get(table_name) %}
                    <div class="card" style="float:left;position:relative;width: 16rem;height: 10rem;">
                        <form class="card-body" action="/crud" method="get">
                            <input name="db_name" type="hidden" value={{ table_name }}>
                            <h5 class="card-title">{{ database_info[table_name]['in_chinese'] }}</h5>
                            <p class="card-text">{{ database_info[table_name]['desc'] }}</p>
                            <button type="submit" class="btn btn-outline-primary">选择</button>
                        </form>
                    </div>

                {% else %} {% endif %} {% endfor %}
        </div>
    </div>

{% endblock %}
